home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
stdlib1.exe
/
lha
/
STRLEN.ASM
< prev
next >
Wrap
Assembly Source File
|
1990-07-11
|
511b
|
42 lines
stdlib segment para public 'slcode'
assume cs:stdlib
;
;
; strlen- Computes the length of the string which ES:DI points at.
;
; inputs:
;
; ES:DI- Points at string to compute the length of.
;
; output:
;
; CX- Length of string.
;
;
public sl_strlen
;
sl_strlen proc far
push ax
pushf
push si
push di
;
cld
mov al, 0
mov cx, 0ffffh
repne scasb
neg cx
dec cx
dec cx
;
pop di
pop si
popf
pop ax
ret
sl_strlen endp
;
;
stdlib ends
end